home *** CD-ROM | disk | FTP | other *** search
-
- // ───────────────────────────────────────────────────────────────────
- // The Aurora Editor v2.0
- // Copyright 1993-1995 nuText Systems. All Rights Reserved Worldwide.
- //
- // View DOS memory
- //
- // This macro reads a user-specified portion of DOS memory into a
- // text buffer for viewing/editing (demonstrates the use of the AML
- // 'peek' function).
- //
- // Note: the address specified is "absolute", not segmented. For example,
- // 095A:0943 would be specified as: ((095Ah x 16) + 943h) = 9EE3h (40675)
- // ───────────────────────────────────────────────────────────────────
-
- include bootpath "define.aml"
-
- // make line length 64 bytes
- define
- set linelength 64
- end
-
- var total_bytes
-
-
- // prompt the user for address and length
- address = ask "Enter memory address"
- length = ask "Number of bytes to read"
-
- if not length then
- return
- end
-
- if address == ' ' then
- address = 0
- end
-
- // create new binary buffer
- buffer = createbbuf
-
- while total_bytes < length do
-
- // get mem contents and insert into buffer
- insline (peek address linelength)
-
- // move to the last line in the buffer
- down 1
-
- // setup to read next memory location
- address = address + linelength
-
- // total up bytes read
- total_bytes = total_bytes + linelength
- end
-
- // delete blank first line
- delline 1 1
-
- // edit the new buffer in a window
- setbufname (qualify "TEMP.TXT" (getbufname))
- openbuf buffer
-
-